// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'

import App from './App'
import router from './router'

import store from './store'

import VueCodemirror from 'vue-codemirror'
import 'codemirror/lib/codemirror.css'
Vue.use(VueCodemirror)

import dataV from '@jiaminghi/data-view'
Vue.use(dataV)

/**
 * 自定义指令
 */
//引入样式
import 'highlight.js/styles/monokai-sublime.css'
//引入库
import hi from 'highlight.js'
//创建指令
Vue.directive('highlight', function (el) {
  let blocks = el.querySelectorAll('pre code');
  console.log(blocks,"blocks");
  blocks.forEach((block) => {
    hi.highlightAll(block)
  })
}) 


Vue.prototype.$hljs = hi;

import '../static/js/jquery.min'
import 'element-ui/lib/theme-chalk/index.css';
import ElementUI from 'element-ui';
Vue.config.productionTip = false

Vue.use(ElementUI)


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
